package com.team6.yygh.msm.utils;

import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * @ClassName ConstantPropertiesUtils
 * @Author ZhuYouWan
 * @Date 2022/10/24 13:30
 **/
@Component
public class ConstantPropertiesUtils implements InitializingBean {
    @Value("${tencent.sms.keyId}")
    private String secretID;
    @Value("${tencent.sms.keysecret}")
    private String secretKey;
    @Value("${tencent.sms.smsSdkAppId}")
    private String smsSdkAppID;
    @Value("${tencent.sms.signName}")
    private String signName ;
    @Value("${tencent.sms.templateId}")
    private String templateID ;

    public static String SECRET_ID;
    public static String SECRET_KEY;
    public static String SMSSDKAPP_ID;
    public static String SIGN_NAME;
    public static String TEMPLATE_ID;
    @Override
    public void afterPropertiesSet() throws Exception {
        this.SECRET_ID = secretID;
        this.SECRET_KEY = secretKey;
        this.SMSSDKAPP_ID = smsSdkAppID;
        this.SIGN_NAME = signName;
        this.TEMPLATE_ID = templateID;
    }
}
